<?php
/**
 * Created by PhpStorm.
 * User: yuhaoyu
 * Date: 12/22/18
 * Time: 1:17 PM
 */
namespace App\Services;
class Service {

    //返回原始信息数组
    protected function message($condition, $message, $data=null) {
        $result = array();
        $result['condition'] = intval($condition);
        $result['message']   = $message;
        if(!is_null($data) && is_array($data)) {
            foreach ($data as $key => $val)
                $result[$key] = $data[$key];
        }
        return $result;
    }
}